home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1998 January / PC Answers Issue 49 Cover CD January 1998.iso / Apps / Director / DATA.Z / Ink Effects.dir / Scripts_42_Related Inks Scene Handlers.ls < prev    next >
Encoding:
Text File  |  1997-05-10  |  1.8 KB  |  54 lines

  1. on highlightRelatedInks whichInk
  2.   global gCurrentInk, gRelatedInksList
  3.   set whichPair to (whichInk - 54) / 11.85999999999999943
  4.   if whichPair < 1 then
  5.     set gCurrentInk to 0
  6.   else
  7.     if whichPair > integer(whichPair) then
  8.       set gCurrentInk to integer(whichPair)
  9.     else
  10.       set gCurrentInk to integer(whichPair) - 1
  11.     end if
  12.   end if
  13.   set the locV of sprite 21 to getaProp(gRelatedInksList, gCurrentInk)
  14.   set the visible of sprite 21 to 1
  15.   updateStage()
  16.   updateText("Related Inks")
  17.   setObjectInkRelatedInks()
  18. end
  19.  
  20. on setObjectInkRelatedInks
  21.   global gCurrentInk, gLeftInkList, gRightInkList
  22.   set newInkLeft to getaProp(gLeftInkList, gCurrentInk)
  23.   set newInkRight to getaProp(gRightInkList, gCurrentInk)
  24.   set the ink of sprite 7 to newInkLeft
  25.   set the ink of sprite 8 to newInkRight
  26.   updateStage()
  27. end
  28.  
  29. on swapObjectRelatedInks whichDirection
  30.   global gThisPair
  31.   set testNameLeft to the name of the member of sprite 7
  32.   set testNameRight to the name of the member of sprite 8
  33.   if whichDirection = "right" then
  34.     if testNameLeft = "objectLeft 11" then
  35.       set the member of sprite 7 to member "objectLeft 1" of castLib "Internal"
  36.       set the member of sprite 8 to member "objectRight 1" of castLib "Internal"
  37.     else
  38.       set the memberNum of sprite 7 to the memberNum of sprite 7 + 2
  39.       set the memberNum of sprite 8 to the memberNum of sprite 8 + 2
  40.     end if
  41.   else
  42.     if whichDirection = "left" then
  43.       if testNameLeft = "objectLeft 1" then
  44.         set the member of sprite 7 to member "objectLeft 11" of castLib "Internal"
  45.         set the member of sprite 8 to member "objectRight 11" of castLib "Internal"
  46.       else
  47.         set the memberNum of sprite 7 to the memberNum of sprite 7 - 2
  48.         set the memberNum of sprite 8 to the memberNum of sprite 8 - 2
  49.       end if
  50.     end if
  51.   end if
  52.   updateStage()
  53. end
  54.